home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_02 / nonport / tabsize.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-17  |  1.1 KB  |  50 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3. #undef    tabsize
  4.  
  5. #ifdef PDCDEBUG
  6. char *rcsid_tabsize = "$Header: C:\CURSES\nonport\RCS\tabsize.c 2.1 1993/06/18 20:22:18 MH Rel MH $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   tabsize()    - Set tab size in window
  15.  
  16.   PDCurses Description:
  17.      This routine sets the tabsize for stdscr and returns the previous
  18.      tab size settings.
  19.  
  20.   PDCurses Return Value:
  21.      This routine returns the previous tab size setting upon success
  22.      otherwise, it returns ERR.
  23.  
  24.   PDCurses Errors:
  25.      It is an error to call this routine before initscr().
  26.  
  27.   Portability:
  28.      PDCurses    int tabsize( int ts );
  29.      X/Open Dec '88    
  30.      SysV Curses    
  31.      BSD Curses    
  32.  
  33. **man-end**********************************************************************/
  34.  
  35. int    tabsize(int ts)
  36. {
  37.     int    origval;
  38.  
  39. #ifdef PDCDEBUG
  40.     if (trace_on) PDC_debug("tabsize() - called\n");
  41. #endif
  42.  
  43.     if (stdscr == (WINDOW *)NULL)
  44.         return( ERR );
  45.  
  46.     origval = stdscr->_tabsize;
  47.     stdscr->_tabsize = ts;
  48.     return( origval );
  49. }
  50.